FROM guosheng1987/php:7.4.22-fpm-buster

MAINTAINER guosheng1987 <guosheng1987@126.com>

RUN sed -i "s/deb.debian.org/mirrors.aliyun.com/g" /etc/apt/sources.list 

RUN apt-get update &&\
    apt-get install -y imagemagick libmagickwand-dev
    
# imagick extension
RUN pecl channel-update pecl.php.net \
	&& pecl install imagick \
	&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/docker-php-ext-imagick.ini \
	&& php -m \
	&& echo -e "Imagick Build Completed"


